10
Beginner’s Guide to Code Algorithms
10
The final spreadsheet would look something like this.
FIGURE 1.3 Combined spreadsheet.
While this is a precise set of steps to accomplish this task, this is completely
manual. If I had 50 states to deal with, this would be taking me too long! In order to
teach any computer how to do this, we need to convert it to an algorithm. This is not
different from the set of steps, as I mentioned before. Just a little more methodical.
Here is an algorithmic version of these steps:
1. Open a new spreadsheet
2. Repeat for each input spreadsheet
a. Open the input spreadsheet
b. Copy all rows used
c. Find the first empty row in new spreadsheet
d. Paste copied rows
3. Save new spreadsheet
4. Send to boss via email
Each of these steps can be achieved in an excel macro, including the sending of email.
What changed it from a set of steps to an algorithm? The repetition.